#!/bin/sh
#
# Converteren upc config file/MySQL naar nieuwe layout, 15-5-2009
# !! Geen logo's meer.
SQLHOST=localhost
SQLUSER=mythtv
SQLWW=mythtv
DATABASE=mythconverg


echo -e "\nConverteren xmltvid's in MySQL voor mythtv"
echo -e "Voor afwijkende user/wachtwoord/database/sqlhost\nkun je in dit script bovenin de variabelen wijzigen."
sleep 2

echo "De volgende entries zijn aanwezig in de database:"
sleep 2
mysql --user="$SQLUSER" --password="$SQLWW" -h "$SQLHOST" "$DATABASE" -e"SELECT channum,xmltvid,name FROM channel WHERE xmltvid LIKE '%upclive.nl';"
sleep 2
echo "Starten met update MySQL..."
mysql --user="$SQLUSER" --password="$SQLWW" -h "$SQLHOST" "$DATABASE" -e"
UPDATE channel SET xmltvid = 'JimJam.upclive.nl' WHERE xmltvid = 'JimJam^Jeugd.upclive.nl';
UPDATE channel SET xmltvid = 'Boomerang.upclive.nl' WHERE xmltvid = 'Boomerang^Jeugd.upclive.nl';
UPDATE channel SET xmltvid = 'VH1.upclive.nl' WHERE xmltvid = 'VH1^Muziek.upclive.nl';
UPDATE channel SET xmltvid = '101.upclive.nl' WHERE xmltvid = '101^Overig.upclive.nl';
UPDATE channel SET xmltvid = '13th+street.upclive.nl' WHERE xmltvid = '13th_street^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Al+Jazeera+Int.upclive.nl' WHERE xmltvid = 'Al_Jazeera_Int^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Al+Jazeera.upclive.nl' WHERE xmltvid = 'Al_Jazeera^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Animal+Planet.upclive.nl' WHERE xmltvid = 'Animal_Planet^Documentaires.upclive.nl';
UPDATE channel SET xmltvid = 'ARD.upclive.nl' WHERE xmltvid = 'ARD^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Arte.upclive.nl' WHERE xmltvid = 'Arte^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'ART+Europe.upclive.nl' WHERE xmltvid = 'ART_Europe^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'ART+Movies.upclive.nl' WHERE xmltvid = 'ART_Movies^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'AT5.upclive.nl' WHERE xmltvid = 'AT5^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'ATV.upclive.nl' WHERE xmltvid = 'ATV^Documentaires.upclive.nl';
UPDATE channel SET xmltvid = 'Baby+TV.upclive.nl' WHERE xmltvid = 'Baby_TV^Jeugd.upclive.nl';
UPDATE channel SET xmltvid = 'BBC+1.upclive.nl' WHERE xmltvid = 'BBC_1^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'BBC+2.upclive.nl' WHERE xmltvid = 'BBC_2^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'BBC+3.upclive.nl' WHERE xmltvid = 'BBC_3^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'BBC+4.upclive.nl' WHERE xmltvid = 'BBC_4^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'BBC+World.upclive.nl' WHERE xmltvid = 'BBC_World^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Cartoon+Netw..upclive.nl' WHERE xmltvid = 'Cartoon_Network^Jeugd.upclive.nl';
UPDATE channel SET xmltvid = 'Club.upclive.nl' WHERE xmltvid = 'Club^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'CNBC.upclive.nl' WHERE xmltvid = 'CNBC^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'CNN.upclive.nl' WHERE xmltvid = 'CNN^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Consum.+24.upclive.nl' WHERE xmltvid = 'Consumenten_TV^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Discovery.upclive.nl' WHERE xmltvid = 'Discovery_Channel^Documentaires.upclive.nl';
UPDATE channel SET xmltvid = 'Discovery+Science.upclive.nl' WHERE xmltvid = 'Discovery_Science^Documentaires.upclive.nl';
UPDATE channel SET xmltvid = 'Discovery+Travel.upclive.nl' WHERE xmltvid = 'Discovery_Travel&Living^Documentaires.upclive.nl';
UPDATE channel SET xmltvid = 'E!+Entertainm..upclive.nl' WHERE xmltvid = 'E!_Entertainment^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'ESPN+Classic.upclive.nl' WHERE xmltvid = 'ESPN_Classic^Sport.upclive.nl';
UPDATE channel SET xmltvid = 'EuroNews.upclive.nl' WHERE xmltvid = 'EuroNews^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Eurosport+2.upclive.nl' WHERE xmltvid = 'Eurosport_2^Sport.upclive.nl';
UPDATE channel SET xmltvid = 'Eurosport.upclive.nl' WHERE xmltvid = 'Eurosport^Sport.upclive.nl';
UPDATE channel SET xmltvid = 'Fashion+TV.upclive.nl' WHERE xmltvid = 'Fashion_TV^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'Film1.1.upclive.nl' WHERE xmltvid = 'Film1.1^Speelfilms.upclive.nl';
UPDATE channel SET xmltvid = 'Film1+1.upclive.nl' WHERE xmltvid = 'Film1+1^Speelfilms.upclive.nl';
UPDATE channel SET xmltvid = 'Film1.2.upclive.nl' WHERE xmltvid = 'Film1.2^Speelfilms.upclive.nl';
UPDATE channel SET xmltvid = 'Film1.3.upclive.nl' WHERE xmltvid = 'Film1.3^Speelfilms.upclive.nl';
UPDATE channel SET xmltvid = 'Hallmark.upclive.nl' WHERE xmltvid = 'Hallmark^Speelfilms.upclive.nl';
UPDATE channel SET xmltvid = 'Fox+Turk.upclive.nl' WHERE xmltvid = 'Fox_Turk^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'Garuda+TV.upclive.nl' WHERE xmltvid = 'Garuda_TV^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Geschiedenis24.upclive.nl' WHERE xmltvid = '/Geschiedenis^Documentaires.upclive.nl';
UPDATE channel SET xmltvid = 'Goed+TV.upclive.nl' WHERE xmltvid = 'Goed_TV^Documentaires.upclive.nl';
UPDATE channel SET xmltvid = 'HaberTurk.upclive.nl' WHERE xmltvid = 'HaberTurk^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Het+Gesprek.upclive.nl' WHERE xmltvid = 'Het_Gesprek^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'History+Channel.upclive.nl' WHERE xmltvid = 'History_Channel^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Holland+Doc24.upclive.nl' WHERE xmltvid = 'Holland_Doc^Documentaires.upclive.nl';
UPDATE channel SET xmltvid = 'Humor+24.upclive.nl' WHERE xmltvid = 'Humor_TV^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Journaal24.upclive.nl' WHERE xmltvid = 'Journaal24^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Ketnet+\+Canvas.upclive.nl' WHERE xmltvid = 'Ketnet_/_Canvas^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'L1+Limburg.upclive.nl' WHERE xmltvid = 'L1_Limburg^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'LBC+Europe.upclive.nl' WHERE xmltvid = 'LBC_Europe^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'MBC.upclive.nl' WHERE xmltvid = 'MBC^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Mezzo.upclive.nl' WHERE xmltvid = 'Mezzo^Muziek.upclive.nl';
UPDATE channel SET xmltvid = 'MGM.upclive.nl' WHERE xmltvid = 'MGM^Speelfilms.upclive.nl';
UPDATE channel SET xmltvid = 'Motors+TV.upclive.nl' WHERE xmltvid = 'Motors_TV^Sport.upclive.nl';
UPDATE channel SET xmltvid = 'MTV+Brand+New.upclive.nl' WHERE xmltvid = 'MTV_Brand_New^Muziek.upclive.nl';
UPDATE channel SET xmltvid = 'MTV.upclive.nl' WHERE xmltvid = 'MTV^Muziek.upclive.nl';
UPDATE channel SET xmltvid = 'Nat.Geo+Wild.upclive.nl' WHERE xmltvid = 'Nat.Geo_Wild^Documentaires.upclive.nl';
UPDATE channel SET xmltvid = 'Nat+Geo.upclive.nl' WHERE xmltvid = 'National_Geographic^Documentaires.upclive.nl';
UPDATE channel SET xmltvid = 'Nederland+1.upclive.nl' WHERE xmltvid = 'Nederland_1^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'Nederland+2.upclive.nl' WHERE xmltvid = 'Nederland_2^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'Nederland+3.upclive.nl' WHERE xmltvid = 'Nederland_3^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'Net+5.upclive.nl' WHERE xmltvid = 'Net_5^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'NickHits.upclive.nl' WHERE xmltvid = 'NickHits^Jeugd.upclive.nl';
UPDATE channel SET xmltvid = 'Nick+JR.upclive.nl' WHERE xmltvid = 'Nick_JR^Jeugd.upclive.nl';
UPDATE channel SET xmltvid = 'Omr.+Brabant.upclive.nl' WHERE xmltvid = 'Omroep_Brabant^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Omr.+Flevoland.upclive.nl' WHERE xmltvid = 'Omroep_Flevoland^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Omr.+Gelderland.upclive.nl' WHERE xmltvid = 'Omroep_Gelderland^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Omrop+Fryslan.upclive.nl' WHERE xmltvid = 'Omrop_Fryslan^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'PCNE.upclive.nl' WHERE xmltvid = 'PCNE^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Playboy.upclive.nl' WHERE xmltvid = 'Playboy^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Poker+Channel.upclive.nl' WHERE xmltvid = 'Poker_Channel^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'Politiek24.upclive.nl' WHERE xmltvid = 'Politiek24^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Private+Spice.upclive.nl' WHERE xmltvid = 'Private_Spice^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'PTV+Prime.upclive.nl' WHERE xmltvid = 'PTV_Prime^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Rai+Uno.upclive.nl' WHERE xmltvid = 'Rai_Uno^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Reality.upclive.nl' WHERE xmltvid = 'Reality^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'RTL+4.upclive.nl' WHERE xmltvid = 'RTL_4^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'RTL+5.upclive.nl' WHERE xmltvid = 'RTL_5^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'RTL+7.upclive.nl' WHERE xmltvid = 'RTL_7^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'RTL+8.upclive.nl' WHERE xmltvid = 'RTL_8^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'RTM.upclive.nl' WHERE xmltvid = 'RTM^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'RTV+N-Holland.upclive.nl' WHERE xmltvid = 'RTV_Noord-Holland^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'RTV+Utrecht.upclive.nl' WHERE xmltvid = 'RTV_Utrecht^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'SBS+6.upclive.nl' WHERE xmltvid = 'SBS_6^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'Sci-Fi+Channel.upclive.nl' WHERE xmltvid = 'Sci-Fi_Channel^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'SET.upclive.nl' WHERE xmltvid = 'SET^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Sky+News.upclive.nl' WHERE xmltvid = 'Sky_News^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Sport1+Extra.upclive.nl' WHERE xmltvid = 'Sport1_Extra_1^Sport.upclive.nl';
UPDATE channel SET xmltvid = 'Sterren.nl.upclive.nl' WHERE xmltvid = 'Sterren.nl^Muziek.upclive.nl';
UPDATE channel SET xmltvid = 'STV.upclive.nl' WHERE xmltvid = 'STV^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'TCM.upclive.nl' WHERE xmltvid = 'TCM^Speelfilms.upclive.nl';
UPDATE channel SET xmltvid = 'Adult+Channel.upclive.nl' WHERE xmltvid = 'The_Adult_Channel^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'TMF.upclive.nl' WHERE xmltvid = 'TMF^Muziek.upclive.nl';
UPDATE channel SET xmltvid = 'TMF+NL.upclive.nl' WHERE xmltvid = 'TMF_NL^Muziek.upclive.nl';
UPDATE channel SET xmltvid = 'TMF+Dance.upclive.nl' WHERE xmltvid = 'TMF_Party^Muziek.upclive.nl';
UPDATE channel SET xmltvid = 'TRT.upclive.nl' WHERE xmltvid = 'TRT^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'TVE.upclive.nl' WHERE xmltvid = 'TVE^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'TV+Rijnmond.upclive.nl' WHERE xmltvid = 'TV_Rijnmond^Nieuws.upclive.nl';
UPDATE channel SET xmltvid = 'Veronica.upclive.nl' WHERE xmltvid = 'Veronica^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'WDR.upclive.nl' WHERE xmltvid = 'WDR^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'ZDF.upclive.nl' WHERE xmltvid = 'ZDF^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Zee+Cinema.upclive.nl' WHERE xmltvid = 'Zee_Cinema^Speelfilms.upclive.nl';
UPDATE channel SET xmltvid = 'Zee+TV.upclive.nl' WHERE xmltvid = 'Zee_TV^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Zone+Horror.upclive.nl' WHERE xmltvid = 'Zone_Horror^Overig.upclive.nl';
UPDATE channel SET xmltvid = 'Extreme+Sports.upclive.nl' WHERE xmltvid = 'Extreme_Sports^Sport.upclive.nl';
UPDATE channel SET xmltvid = 'Travel+Channel.upclive.nl' WHERE xmltvid = 'Travel_Channel^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'TV+Oranje.upclive.nl' WHERE xmltvid = 'TV_Oranje^Algemeen.upclive.nl';
UPDATE channel SET xmltvid = 'Weer+%26+Verkeer.upclive.nl' WHERE xmltvid = 'Weer_en_verkeer^Nieuws.upclive.nl';
"
sleep 2

echo -e "\nKlaar."

